<template>
    <div>
        <!-- <h1>个人中心</h1> -->
        <div class="personal">
            <div class="left">
                <div><h3>会员中心</h3></div>
                <el-col :span="12" >
                    <el-menu
                    router
                    :default-active="$route.path"
                    class="el-menu-vertical-demo"
                    @open="handleOpen"
                    @close="handleClose">
                    <el-menu-item index="1">
                        <i class="el-icon-menu"></i>
                        <span slot="title">我的购物车</span>
                    </el-menu-item>
                    <el-submenu index="2">
                        <template slot="title">
                            <i class="el-icon-menu"></i>
                            <span slot="title">订单管理</span>
                        </template>
                        <el-menu-item-group>
                        <el-menu-item index="/personal/myorder">我的订单</el-menu-item>
                        <el-menu-item index="/personal/myaddress">收货地址</el-menu-item>
                        </el-menu-item-group>
                    </el-submenu>
                    <el-menu-item index="3">
                        <i class="el-icon-document"></i>
                        <span slot="title">我的退换货</span>
                    </el-menu-item>
                    <el-submenu index="4">
                        <template slot="title">
                            <i class="el-icon-menu"></i>
                            <span slot="title">账户管理</span>
                        </template>
                        <el-menu-item-group>
                        <el-menu-item index="/personal/mymessage">用户信息</el-menu-item>
                        <!-- <el-menu-item index="1-2">修改密码</el-menu-item> -->
                        </el-menu-item-group>
                    </el-submenu>
                    </el-menu>
                </el-col>  
            </div>
            <div class="right">
                <div class="top">
                    <div>
                        <img src="/images/index/01_per.png" alt="">
                    </div>
                    <div class="right">
                        <span>您好~</span>
                        <h2>fantuan啊</h2>
                        <p><a>编辑个人资料</a></p>
                    </div>
                </div>
                <div class="main">
                    <router-view/>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
    export default {
        data() {
            return {
                activeName: 'first'
            };
        },
        methods: {
            handleOpen(key, keyPath) {
                console.log(key, keyPath);
            },
            handleClose(key, keyPath) {
                console.log(key, keyPath);
            },
            handleClick(tab, event) {
                console.log(tab, event);
            }
        },
    }
</script>
<style scoped src="../../assets/css/index.css"></style>
<style lang="scss" scoped>
</style>